# Home NAS system ***Copyright © Quectel Wireless Solutions Co., Ltd. 2026. All rights reserved.*** --- The home NAS system is built on the Quectel Pi M2 smart single-board computer, provides high-speed storage via SSD solid state drives, enables file sharing through the Samba service, supports multiple access methods, and delivers a convenient privatized deployment solution for home users. ```{image} images/image_NsvBbGg4voJiXrxwUxkcBetsnRb.webp :width: 800px :height: 476px ``` # Development resources summary ## Development accessories list | **Accessory name** | **Quantity** | **Specifications** | | --- | --- | --- | | Quectel Pi M2 smart single-board computer | 1 | - | | USB-C power supply | 1 | [Official 45W USB Type-C Power Supply for Raspberry Pi 5, White Color, US Plug]() | | HDMI Type-A Male Cable | 1 | HDMI 2.0; cable length 1 m; connectors: HDMI-A (male) to HDMI-A (male) | | Ethernet cable | 1 | Length: 1m; Transmission rate: Gigabit | | SSD solid state drive | 1 | [Official Raspberry Pi SSD Kit, inlcuding 256 GB high-speed solid state driver, Raspberry Pi M.2 HAT + complies with PCIe Gen3 suitable for Raspberry Pi 5]() | | Display screen | 1 | 24-inch HDMI monitor | ## Physical reference of accessories ```{image} images/image_INx7b402oo2AQux4BRocSNdynMS.webp :width: 710px :height: 423px :align: center ``` # Get started quickly ## Development preparation **The Quectel Pi M2** comes pre-installed with **Debian 13** system image, so no re-flashing is required. Just follow the steps below. ## Hardware connection Complete all hardware connections by following the steps below. The step numbers match the labels in the interface diagram. ```{image} images/image_ABh5b0KoMoSHl8xkMm9cnFSJnce.webp :width: 629px :height: 437px :align: center ``` 1. **Display Connection:** Choose the connection method based on your monitor's interface. Here we use Option 2: connect one end of the Micro HDMI cable to the main board's Micro HDMI port and the other end to the monitor's HDMI port. 1. Option 1 (HD): Connect one end of the **FPC** ribbon cable to the **MIPI** port on the **Quectel Pi M2**, and the other end to the monitor's **MIPI** port. Refer to the [MIPI](<../../../User guide/Display/MIPI/MIPI.md>) for details. 1. Option 2 (Compatible): Connect one end of the **HDMI** cable to the **HDMI** port on the **Quectel Pi M2**, and the other end to the monitor's **HDMI** port. 2. **Network Connection**: Connect the **Quectel Pi M2** Ethernet port to the router's **LAN** port using an Ethernet cable. 3. **Peripheral Connection**: Plug the USB keyboard, mouse, and USB camera into the **USB-A** ports on the **Quectel Pi M2**. For wireless keyboard/mouse, simply plug the receiver into a **USB** port. 4. **Power Connection**: Finally, plug the **USB-A** end of the power cable into the power adapter, and the **USB-C** end into the power port on the **Quectel Pi M2**. 5. **SSD connection:** First, install the three nylon standoffs and secure their bases with three short screws. Then install the GPIO adapter and press down firmly to ensure all pins are fully seated. Next, insert the PCIe adapter cable fully and evenly into the PCIe port on the Quectel Pi M2, and push down the PCIe connector brackets from both sides to lock the cable firmly in place. ```{image} images/image_ZbZ8bhalToSnMwxxeMOcMfvunxf.webp :width: 802px :height: 470px :align: center ``` ## Project implementation ### **Update software sources** ```bash sudo apt-get update ``` ### **Install Samba** ```bash sudo apt-get install samba ``` ### **Create mount folder** ```bash sudo mkdir /mnt/resource ``` ### **Set permissions for mount folder** ```bash sudo chown -R username: /mnt/resource/ ``` ### **Check disk info** - Check the device corresponding to each partition ```bash awk 'NR > 2 {printf "%-10s %s\n", $4, $3 / 1024 / 1024 " GB"}' /proc/partitions ``` ```{image} images/image_GpaHb70CzoWHjkxfxMIcuheGnqo.webp :width: 608px :height: 526px ``` - Formatting SSD ```bash sudo mkfs.ext4 /dev/nvme0n1 # Format the hard drive device according to its actual mount location ``` - Check the filesystem type of the storage device to be mounted (Note: The Quectel Pi M2 uses ext4 for mounting by default. If the filesystem type of the external storage device does not match, the storage device needs to be reformatted). ```bash sudo blkid ``` ```{image} images/image_NF8vb4rF2oVx7rxO2BvcjTnznrM.webp :width: 1261px :height: 355px ``` - Check current mounts (If there is an existing mount point under /mnt/resource, you need to unmount it first). ```bash df -h ``` ```{image} images/image_ZpoNbCHSeoyD81xlR3wccz1qnSc.webp :width: 703px :height: 213px ``` - Check the UUID of the corresponding partition, as well as the user's uid and gid. ```bash ls -lha /dev/disk/by-uuid id username ``` ```{image} images/image_Mm64bqi7Nowk8txBxzac1WmSnmh.webp :width: 755px :height: 139px ``` ### Modify configuration file Here we use a 256GB solid state drive as the NAS server, so we select nvme0n1 as the extended partition to mount and modify the fstab file. ```bash sudo apt install vimsudo vim /etc/fstab ``` Press **ESC+"i"** to add the following statement to the end of the file. After adding it, press **ESC+"Shift + :"**, then type **wq** and press **Enter** to save and exit. ```bash #Use ext4 as the file system, referring to the partition file type queried in the previous step.#Add the nofail option. The nofail option allows normal booting even if the device does not exist.UUID=The UUID queried in the previous step /mnt/resource ext4 defaults,nofail 0 0 ``` ```{image} images/image_KGMqbfQAvo4cF0x5UHNckFs4nnd.webp :width: 841px :height: 57px ``` ### **Mount the device** ```bash sudo mount /mnt/resource df -h ``` ```{image} images/image_Vq3zbKjhmoCzmfxPVxjccEK4nQe.webp :width: 684px :height: 201px ``` ### **Configure Samba user** ```bash sudo smbpasswd -a username ``` > Note: Enter the current username and password. Please note that the user here must be an existing **Linux** user. ### **Edit Samba config** Enter the following command to open the configuration file ```bash sudo vim /etc/samba/smb.conf ``` Add the following statements at the end of the file (the content in brackets is the disk name displayed externally). ```plaintext [resource] comment = Resource create mask =0777 directory mask = 0777 path = /mnt/resource valid users = pi read only = no vfs objects = catia fruit streams_xattr ``` ### **Check configuration** ```bash sudo testparm -s ``` ```{image} images/image_FdECbOao0o87QdxYgQhcON3Vnne.webp :width: 819px :height: 543px ``` ### **Restart Samba** ```bash sudo systemctl restart smbd sudo systemctl enable smbd ``` ### Add firewall rules ```plaintext #Add allowed ports sudo iptables -A INPUT -p tcp -m tcp --dport 445 -j ACCEPT sudo iptables -A INPUT -p tcp -m tcp --dport 139 -j ACCEPT #Allow client IPs through the firewall sudo iptables -A INPUT -p icmp --icmp-type echo-request -s 192.xx.xx.xx -j ACCEPT #Saving Rules sudo sh -c 'iptables-save > /etc/iptables/rules.v4' ``` ### Test Samba service - To test if a mounted folder has the necessary permissions, enter the following command. If the test file appears, it means you can perform operations on that folder. ```bash sudo -u username touch /mnt/resource/test_from_kane.txt ``` ```{image} images/image_XNHFbgIhXokLDUxP8NVcoRuRnyf.webp :width: 644px :height: 66px ``` - Test the Samba share connectivity in Windows CMD. If the customized **resource** folder is displayed, it proves that the NAS server has been successfully set up. ```bash net view \\[NAS_IP] ``` ```{image} images/image_GCPobafKyorjrexnAYEcQqnPnpe.webp :width: 962px :height: 282px ``` ## Connect to the NAS server ### Windows file explorer (Easiest) - Enter the following commands in sequence in the console of the Quectel Pi M2 to grant the user the highest privileges for operation. ```bash cd /mnt sudo chmod 777 resource/ ``` - Next, enter the `ip address` command in the console to query the IP address of Quectel Pi M2. - Open Windows File Explorer, enter"**\\ + the IP address of Quectel Pi M2**"in the search box, and press **Enter** to view the two shared folders. ```{image} images/image_Cbyxb4Gxzog1CHx3bVgcMmKsnBg.webp :width: 872px :height: 631px ``` - After opening the **resource** folder in Windows File Explorer, users can directly add, delete, and modify files within the mounted folder. ```{image} images/image_RfHtb7OdjoOalnxlIHNcwqLgnUf.webp :width: 775px :height: 125px ``` ### SCP commands - Upload files from Windows to NAS server. ```bash scp "local_file_path" Quectel Pi M2 username@nas_ip:/mnt/resource/ ``` - Upload an entire folder to the NAS server from Windows. ```bash scp -r "local_folder_path" Quectel Pi M2 username@nas_ip:/mnt/resource/ ``` ### CasaOS **CasaOS** is an open-source home storage solution built on the **Docker** ecosystem, designed specifically for home users to deliver simple, easy-to-use, and elegant personal storage services. It allows users to quickly build and manage various home entertainment and smart applications, such as media servers, file storage services, and ad blockers, through a user-friendly graphical interface. - **Update Source** ```bash sudo apt update ``` - **Install docker** ```bash sudo apt install docker.io ``` - **Start the docker service** ```bash sudo systemctl start docker sudo systemctl enable docker ``` - **Check docker service status** ```bash sudo systemctl status docker ``` After successful startup, the following is shown: ```{image} images/image_Lo7WbEJLGoKED6xgYXRc13HlnYO.webp :width: 1168px :height: 347px ``` - **Install the full version of wget** ```bash sudo apt install wget -y ``` When the following option box appears, just press **Enter**. ```{image} images/image_AwBYbOhuroMjoix7gajcTnepnof.webp :width: 378px :height: 172px ``` - **Install CasaOS** ```bash sudo apt install curl -fsSL https://get.casaos.io | sudo bash ``` After successful installation, copy the URL in the red box and open it in the browser. ```{image} images/image_G4dWb4uF8oDHhPxQoWbcE2sHnVc.webp :width: 1135px :height: 574px ``` After creating an account, log in and click **Files**. After finding the folder mounted on the NAS server in the Root directory, you can directly upload, delete, modify, etc in the folder. ```{image} images/image_T0zpbiEvaorYwOx3H3acQeFFnVf.webp :width: 1047px :height: 615px ``` ```{image} images/image_QerqbdS5hoyiLExrusEcSamhnVc.webp :width: 1906px :height: 928px ``` # Application demo
7940393474409782933
# Technical Support and Contributions If you encounter any issues during use, please submit technical inquiries on the [Quectel Official Forum](). Our technical support team will respond promptly.